package com.erji.admin.exception;


import com.erji.common.exception.IError;

/**
 * SysErrorCode类
 *
 * @author mwmh
 * @date 2024/8/3
 */
public enum SysErrorCode implements IError {

    BUSINESS_NOT_EXIST(10001, "商家不存在"),
    ORDER_TASK_NOT_EXIST(10002, "订单任务不存在"),
    BUSINESS_IS_DUPLICATE(10003, "商家名称重复"),
    PRODUCT_NOT_EXIST(510001, "商品不存在"),
    PRODUCT_CATEGORY_NOT_EXIST(510002, "商品类别不存在"),
    PRODUCT_ATTRIBUTE_NOT_EXIST(510003, "商品属性不存在"),
    HOME_NEW_PRODUCT_NOT_EXIST(510004, "首页新品不存在"),
    HOME_CAROUSEL_NOT_EXIST(510005, "首页轮播图不存在"),
    HOME_RECOMMEND_PRODUCT_NOT_EXIST(510006, "首页优选推荐不存在"),
    WECHAT_API_ERROR(520001, "微信api调用异常"),
    WECHAT_OPEN_ID_EMPTY(520002, "openid为空"),
    MEMBER_NOT_EXIST(520003, "会员不存在"),

    ;

    private final Integer code;

    private final String message;

    SysErrorCode(Integer code, String message) {
        this.message = message;
        this.code = code;
    }

    @Override
    public Integer code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }
}
